home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
awe2-0_1.lha
/
awe2-0.1
/
Src
/
RCS
/
HardwareContext-umax.s,v
< prev
next >
Wrap
Text File
|
1989-06-21
|
2KB
|
129 lines
head 3.3;
branch ;
access ;
symbols ;
locks grunwald:3.3; strict;
comment @# @;
3.3
date 89.06.21.10.14.29; author grunwald; state Exp;
branches ;
next 3.2;
3.2
date 89.02.20.15.34.54; author grunwald; state Exp;
branches ;
next 3.1;
3.1
date 88.12.20.13.50.33; author grunwald; state Exp;
branches ;
next 1.1;
1.1
date 88.10.30.13.03.42; author grunwald; state Exp;
branches ;
next ;
desc
@@
3.3
log
@*** empty log message ***
@
text
@# Function:
.text
define(THREAD_FP, 0($1))
define(THREAD_SP, 4($1))
define(THREAD_BASE,8($1))
define(THREAD_END, 12($1))
define(THREAD_MAX, 16($1))
define(CONTEXT_FROM, 8(fp)) # pointer to object instance
define(CONTEXT_TO, 12(fp)) # first arg
# Thread::exchj() -- Thread exchange jump (co--routine call)
#
# Transfer control from the active process to a new process.
#
.text
#ifdef __Cplusplus__
.globl __HardwareContext_magicSwitchTo
__HardwareContext_magicSwitchTo:
#endif
#ifdef __GNUG__
.globl _magicSwitchTo_PSHardwareContext_PSHardwareContext
_magicSwitchTo_PSHardwareContext_PSHardwareContext:
#endif
enter [r1,r2,r3,r4,r5,r6,r7],$0
movl f0,tos
movl f2,tos
movl f4,tos
movl f6,tos
movd CONTEXT_FROM,r0
sprd fp,THREAD_FP(r0) # save the current FP
sprd sp,THREAD_SP(r0)
movd CONTEXT_TO,r0 # r0 = address of dst Thread object
lprd fp,THREAD_FP(r0) # load FP of destination Thread
lprd sp,THREAD_SP(r0) # load Sp of destination
movl tos,f6
movl tos,f4
movl tos,f2
movl tos,f0
exit [r1,r2,r3,r4,r5,r6,r7]
ret $0
.text
#ifdef __Cplusplus__
.globl __HardwareContext_getSp
__HardwareContext_getSp:
#endif
#ifdef __GNUG__
.globl _getSp_PSHardwareContext
_getSp_PSHardwareContext:
#endif
sprd sp,r0 # load the FP into the return reg
ret $0
@
3.2
log
@Start using Gnu library heaps for schedulers
@
text
@d21 4
d50 4
@
3.1
log
@Steay version
@
text
@@
1.1
log
@Initial revision
@
text
@d3 5
a7 5
define(THREAD_FP, 0($*))
define(THREAD_SP, 4($*))
define(THREAD_BASE,8($*))
define(THREAD_END, 12($*))
define(THREAD_MAX, 16($*))
@